testfile = open('./test1', 'w', encoding='utf-8')
ifc=['如果','假如','要是','当','遇到','碰到','一旦','如','']
otherc=['对手','敌人','对面','对方','别人','他','他们']
selfc=['我','我们','咱','俺','本人']
gxc=['大于','等于','小于','不大于','不等于','不小于','多于','少于','多过']
numc=['一','一个','一次']
nnc=['气','攻击次数','防御次数']
actc=['攻击','防御','集气']
for c1 in ifc:
    for c2 in otherc:
        for c3 in nnc:
            for c4 in gxc:
                for c5 in selfc:
                    for c6 in actc:
                        testfile.write(c1+c2+'的'+c3+c4+c5+',则'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+'则'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+'的'+c3+',则'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+'的'+c3+'则'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+'的'+c3+c6+' 01\n')
                        testfile.write(c6+c1+c2+'的'+c3+c4+c5+' 10\n')
                        testfile.write(c6+','+c1+c2+'的'+c3+c4+c5+' 10\n')
                        testfile.write(c6+c1+c2+'的'+c3+c4+c5+'的'+c3+' 10\n')
                        testfile.write(c6+','+c1+c2+'的'+c3+c4+c5+'的'+c3+'10\n')
                     
for c1 in ifc:
    for c2 in otherc:
        for c3 in nnc:
            for c4 in gxc:
                for c5 in nnc:
                    for c6 in actc:
                        testfile.write(c1+c2+'的'+c3+c4+c5+',就'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+'就'+c6+' 01\n')
                        testfile.write(c1+c2+'的'+c3+c4+c5+c6+' 01\n')
for c1 in ifc:
    for c2 in otherc:
        for c3 in nnc:
            for c4 in gxc:
                for c5 in nnc:
                    for c6 in actc:
                        for c7 in nnc:
                            for c8 in gxc:
                                for c9 in nnc:
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'和'+c7+c8+c9+',就'+c6+' 021\n')
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'并且'+c7+c8+c9+'就'+c6+' 021\n')
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'而且'+c7+c8+c9+'就'+c6+' 021\n')                      
                        
for c1 in ifc:
    for c2 in otherc:
        for c3 in nnc:
            for c4 in gxc:
                for c5 in nnc:
                    for c6 in actc:
                        for c7 in nnc:
                            for c8 in gxc:
                                for c9 in nnc:
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'或'+c7+c8+c9+',就'+c6+' 031\n')
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'或者'+c7+c8+c9+'就'+c6+' 031\n')
                                    testfile.write(c1+c2+'的'+c3+c4+c5+'或是'+c7+c8+c9+'就'+c6+' 031\n')      

testfile.close()
print('-----------ok------------')